package liurong.driver.string;

import com.alibaba.fastjson.JSON;

public class StringTest {
	// public static void main(String[] args) {
	// String s1 = "123456";
	// String s2 = "123456";
	// String s3 = "123" + "456";
	// String s4 = new String("123456");
	// String s5 = new String("123456").intern();
	// String s6 = "123";
	// String s7 = "456";
	// String s8 = s6 + "456";
	// String s9 = (s6 + s7).intern();
	//
	// System.out.println("s1=s2:" + (s1 == s2));// true
	// System.out.println("s1=s3:" + (s1 == s3));// true
	// System.out.println("s1=s4:" + (s1 == s4));// false
	// System.out.println("s1=s5:" + (s1 == s5));// true
	// System.out.println("s1=s8:" + (s1 == s8));// false
	// System.out.println("s1=s9:" + (s1 == s9));// true
	//
	// int a = 1234567890;
	// }
	// public static void main(String[] args) {
	// System.out.println("0.11".matches("^(([1-9]{1}\\d{0,7})|([0]{1}))(\\.(\\d){0,2})?$"));
	// }

//	public static void main(String[] args) {
////		StaticClassTest.A_STRING = "1111";
//
//		long start = System.currentTimeMillis();
//		// 798
//		StringBuffer stringBuffer = new StringBuffer();
//		for (int i = 0; i < 10000000; i++) {
//			stringBuffer.append(i + "");
//		}
//		long middle = System.currentTimeMillis();
//
//		// 743
//		StringBuilder stringBuilder = new StringBuilder();
//		for (int i = 0; i < 10000000; i++) {
//			stringBuilder.append(i + "");
//		}
//		long end = System.currentTimeMillis();
//
//		System.out.println("builder:" + (middle - start));
//		System.out.println("buffer:" + (end - middle));
//	}

//	public static void main(String[] args) {
//		StringBuffer str = new StringBuffer();
//		if (null != str)
//			str.delete(0, str.length());
//		final int length = 14 - String.valueOf(1).length();
//		/* 唯一序列高位补0 */
//		for (int i = 0; i < length; i++)
//			str.append(0);
//		str.append(1);
//		str.insert(0, 100);
//		str.insert(3, 11);
//		System.out.println(str.toString());
//	}

//	public static void main(String[] args) {
//		final Thread thread1 = new Thread(new Runnable() {
//			@Override
//			public void run() {
//				System.out.println("A");
//			}
//		});
//		final Thread thread2 = new Thread(new Runnable() {
//			@Override
//			public void run() {
//				try {
//					thread1.join();
//					System.out.println("B");
//				} catch (InterruptedException e) {
//					// TODO Auto-generated catch block
//					e.printStackTrace();
//				}
//			}
//		});
//		Thread thread3 = new Thread(new Runnable() {
//			@Override
//			public void run() {
//				try {
//					thread2.join();
//					System.out.println("C");
//				} catch (InterruptedException e) {
//					// TODO Auto-generated catch block
//					e.printStackTrace();
//				}
//			}
//		});
//
//		thread1.setDaemon(false);
//		thread2.setDaemon(false);
//		thread3.setDaemon(false);
//
//		thread3.start();
//		thread2.start();
//		thread1.start();
//	}

	public static void main(String[] args) {
		System.out.println(JSON.parseArray(
				"[{\"id\":3838,\"failType\":5,\"content\":\"{\\\"id\\\":21379,\\\"sellerCode\\\":\\\"CU201906284813\\\",\\\"sellerName\\\":\\\"切仓云仓A商家\\\",\\\"subjectCode\\\":\\\"YUNTENG\\\",\\\"customerSku\\\":\\\"hpztest1212SS001\\\",\\\"skuNo\\\":\\\"HP201912130017\\\",\\\"skuName\\\":\\\"hpztest1212SS001hpztest1212SS001hpztest1212SS001hpztest1212SS001hpztest1212SS001hpztest1212SS001hpzt\\\",\\\"barCode\\\":\\\"hpztest20191212SS001\\\",\\\"warehouseCode\\\":\\\"YUNJICK2019628130\\\",\\\"warehouseName\\\":\\\"切仓云仓A仓\\\",\\\"inventoryType\\\":\\\"ZP\\\",\\\"brokenGrade\\\":0,\\\"orderType\\\":25,\\\"changeType\\\":1,\\\"systemEffect\\\":3,\\\"orderId\\\":\\\"YSO949870191230110000309033\\\",\\\"relateOrderId\\\":\\\"YSO949870191230110000309033\\\",\\\"uniqueBizCode\\\":\\\"YSO949870191230110000309033_lock\\\",\\\"beforeRouteCount\\\":582,\\\"changeRouteCount\\\":0,\\\"afterRouteCount\\\":582,\\\"beforeLockCount\\\":46,\\\"changeLockCount\\\":1,\\\"afterLockCount\\\":47,\\\"beforeWarehouseCount\\\":1021,\\\"changeWarehouseCount\\\":0,\\\"afterWarehouseCount\\\":1021,\\\"beforeFreezeCount\\\":0,\\\"changeFreezeCount\\\":0,\\\"afterFreezeCount\\\":0,\\\"inventoryId\\\":11153}\"}]"));
	}
}
